<?php require_once(dirname(__FILE__)."/../../config/config.php");

$user=$_REQUEST['user'];
$pass=$_REQUEST['pass'];


$sql="select * from zy_user where user_name='$user'";
$rs=mysql_query($sql);
//判断用户是否存在
if($row=mysql_fetch_array($rs)){
	$sql="select * from zy_user where user_name='$user' and password='$pass'";
	$rs=mysql_query($sql);
	//判断用户名和密码是否正确
	if($row=mysql_fetch_array($rs)){
		echo "Login Success"; 
	}else
	echo "Login Failed";
	
}else{
	echo "the user does not exist";
}
